package com.atguigu.servlet;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

@WebServlet(value = "/s2",loadOnStartup = 6)
public class Servlet1 extends HttpServlet  {
    public Servlet1() {
        System.out.println("servle类构造方法");
    }

    @Override
    public void init() throws ServletException {
        System.out.println("serelet初始化方法");
    }
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("请求发送");
    }

    @Override
    public void destroy() {
        System.out.println("销毁");
    }

}
